package com;

import java.util.HashMap;
import java.util.Map;

public class TestTwoNumberAdd {

	public static void main(String[] args) {
		Map<Integer, Integer> countMap = new HashMap<>();
		int one = 6;
		int two = 6;
		for (int i = 1; i <= one; i++) {
			for (int j = 1; j <= two; j++) {
				putResToMap(countMap, i + j);
			}
		}
		System.out.println(countMap);
	}

	private static void putResToMap(Map<Integer, Integer> countMap, Integer res) {
		if (!countMap.containsKey(res)) {
			countMap.put(res, 1);
		} else {
			countMap.put(res, countMap.get(res) + 1);
		}
	}

}
